#include <iostream>

#include <gflags/gflags.h>
#include "common/tools.h"
#include "common/ioutils.h"
#include "processor.h"
#include "cloudFunc.hpp"
DEFINE_string(pcd_file_path,"./scan3.pcd","PCD文件路径");
int main(int argc,char** argv)
{
	google::ParseCommandLineFlags(&argc, &argv, true);
	auto cloud = IoUtils<pcl::PointXYZRGB>::loadPointFromFile(FLAGS_pcd_file_path);
	for(auto &p:cloud->points){
		p.r =255;
		p.g =255;
		p.b =255;
	}
	Processor<pcl::PointXYZRGB> p(cloud);
	p.addTask("task1",CloudFunc::get_plane_func)
	 .addTask("task2",CloudFunc::get_line_func);
	p.runTask();
	//Processor<pcl::PointXYZRGB>::CloudPtrType cloud1 = p.getCloud();
    showPointCouldForver(cloud);
	return 0;
}
